#ifndef DEMUXTHREAD_H
#define DEMUXTHREAD_H

#include <QThread>
#include "demuxmedia.h"
#include "audiothread.h"
#include "videothread.h"
namespace wxb{
class DemuxThread : public QThread
{
public:
    explicit DemuxThread(QObject *parent = nullptr);

public:
    void run() override;
    //启动解封装、音视频解码线程
    void startAll();
    bool open(const char* url);

private:
    bool exitFlag = false;
    DemuxMedia demuxMedia;
    AudioThread* audioThread = nullptr;
    VideoThread* videoThread = nullptr;

};
}

#endif // DEMUXTHREAD_H
